package cn.wen.yinxiu.member.controller;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import cn.wen.yinxiu.common.convention.result.Results;
import cn.wen.yinxiu.member.service.UsersService;
import cn.wen.yinxiu.member.vo.ChatRecordInfo;
import cn.wen.yinxiu.member.vo.ChatRecordVO;
import cn.wen.yinxiu.member.vo.TalkBoxRecordVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import cn.wen.yinxiu.member.entity.ChatRecordEntity;
import cn.wen.yinxiu.member.service.ChatRecordService;
import cn.wen.yinxiu.common.toolkit.PageUtils;
import cn.wen.yinxiu.common.convention.result.ResultEntity;



/**
 * 
 *
 * @ClassName: ChatRecord
 * @Author 小飞
 * @Email coderwen22@163.com
 * @Date 2023-05-21 22:19:26
 * @Description:
 */
@RestController
@RequestMapping("/web")
public class ChatRecordController {

    @Autowired
    private ChatRecordService chatRecordService;

    @Autowired
    private UsersService usersService;

    @GetMapping("/api/user/chat/record/list")
    public ResultEntity getTalkBoxInfo(@RequestParam("userId") Long userId,
                                       @RequestParam("talkId") Long talkId,
                                       @RequestParam("talkType") Integer talkType,
                                       @RequestParam("page") Integer page) {
        List<ChatRecordVO> chatRecordVOList = chatRecordService
                .queryChatRecordVOList(talkId, userId, talkType, page);
        return Results.success(chatRecordVOList);
    }


}
